<div class="wrapper-md ng-scope">

<div class="row">
<div class="col-md-5">
	<div class="panel panel-default ">
		<div class="panel-heading font-bold">菜单列表</div>
		<div class="panel-body">
			<div  class="form-horizontal" >
			<div class="form-group">
	          <label class="col-sm-3 control-label">模块</label>
	            <div class="col-sm-8">
	                <ui-select ng-model="modulecode" theme="bootstrap"
	                on-select="onSelect($item, $model)"
	                >
	                  <ui-select-match placeholder="请选择一个......">
	                  	{{$select.selected.name}}
	                  </ui-select-match>
	                  <ui-select-choices 
	                  repeat="item.value as item in modulearr | filter: $select.search">
	                    <span ng-bind-html="item.name | highlight: $select.search"></span>
	                  </ui-select-choices>
	                </ui-select>
	            </div>
	        </div>

	        <div class="form-group">
	          <label class="col-sm-3 control-label" >查询</label>
	          <div class="col-sm-8">
	            <input type="text" class="form-control" 
	            ng-model="predicate"
	            >
	          </div>
	        </div>

	        </div>

			<treecontrol class="tree-boot"
			   tree-model="dataForTheTree"
			   options="treeOptions"
			   on-selection="showSelected(node)"
			   filter-expression="predicate" 
			   filter-comparator="comparator"
			   selected-node="node1">
			   {{node.system_menu_name}} ({{node.system_menu_code}})
			   
			</treecontrol>

		</div>
	</div>
</div>

<div class="col-md-7">
	<div class="panel panel-default">
		<div class="panel-heading font-bold">菜单信息</div>
		<div class="panel-body">
		<form name="form1" class="form-horizontal" >

			<div class="form-group">
              <div class="col-sm-offset-3 col-lg-9"
               ng-if="what === 'modify'"
              >
              	<button type="button" class="btn btn-sm btn-primary"
                 ng-click="addsubmenu(obj)"
                 ng-if="obj.id !== ''"
                >添加下级菜单</button>
                <button type="button" class="btn btn-sm btn-danger"
                 ng-click="changefid(obj)"
                 ng-if="obj.id !== ''"
                >修改节点</button>
                <button type="button" class="btn btn-sm btn-success"
                 ng-click="gogogo(obj)"
                >提交</button>
                <button type="button" class="btn btn-sm btn-info"
                 ng-click="cancel()"
                >取消</button>
              </div>

              <div class="col-sm-offset-3 col-lg-9"
               ng-if="what === 'submenu'"
              >
                <button type="button" class="btn btn-sm btn-success"
                 ng-click="gogogo(obj)"
                >提交</button>
                <button type="button" class="btn btn-sm btn-info"
                 ng-click="cancel()"
                >取消</button>
              </div>


              <div class="col-sm-offset-3 col-lg-9"
               ng-if="what === 'fid'"
              >
              	<button type="button" class="btn btn-sm btn-success"
                 ng-click="gogogofid(obj.id)"
                >修改节点</button>
                <button type="button" class="btn btn-sm btn-info"
                 ng-click="cancel()"
                >取消</button>
              </div>

            </div>


            

            <div class="alert alert-danger"
             ng-if="what === 'fid'"
            >请选择父亲节点</div>


            <div ng-if="what !== 'fid'">
			<div class="form-group">
              <label class="col-sm-3 control-label">菜单编号</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" 
                 ng-model="obj.system_menu_code"
                >
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">菜单名称</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" 
                 ng-model="obj.system_menu_name"
                >
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">路径</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" 
                 ng-model="obj.system_menu_url"
                >
              </div>
            </div>

			
            <div class="form-group">
              <label class="col-sm-3 control-label">模块名称</label>
              <div class="col-sm-9">
                <p class="form-control-static">{{obj.system_module_name}}</p>
              </div>
            </div>


            <div class="form-group">
              <label class="col-sm-3 control-label">排序</label>
              <div class="col-sm-9">
                <input type="number" class="form-control" 
                 ng-model="obj.system_menu_sort"
                >
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">打开方式</label>
              <div class="col-sm-9">
                <input type="text" class="form-control" 
                 ng-model="obj.system_menu_open_type"
                >
              </div>
            </div>

			

            <div class="form-group">
	            <label class="col-sm-3 control-label">校验</label>
	            <div class="col-sm-9">
	              <label class="i-switch m-t-xs m-r">
	                <input type="checkbox" 
	                  name='sdf'
				  	  ng-true-value="'0'"
				  	  ng-false-value="'1'"
				  	  ng-model="obj.system_menu_check_flag"
	                >
	                <i></i>
	              </label>
	            </div>
	        </div>



	        <div class="form-group">
	            <label class="col-sm-3 control-label">权限</label>
	            <div class="col-sm-9">
	              <label class="i-switch m-t-xs m-r">
	                <input type="checkbox" 
	                  name='sdf'
				  	  ng-true-value="'0'"
				  	  ng-false-value="'1'"
				  	  ng-model="obj.system_menu_auth_code"
	                >
	                <i></i>
	              </label>
	            </div>
	        </div>



	        <div class="form-group">
	            <label class="col-sm-3 control-label">开启</label>
	            <div class="col-sm-9">
	              <label class="i-switch m-t-xs m-r">
	                <input type="checkbox" 
	                  name='sdf'
				  	  ng-true-value="'0'"
				  	  ng-false-value="'1'"
				  	  ng-model="obj.system_menu_start_flag"
	                >
	                <i></i>
	              </label>
	            </div>
	        </div>


	        <div class="form-group">
	            <label class="col-sm-3 control-label">移动设备</label>
	            <div class="col-sm-9">
	              <label class="i-switch m-t-xs m-r">
	                <input type="checkbox" 
	                  name='sdf'
				  	  ng-true-value="'0'"
				  	  ng-false-value="'1'"
				  	  ng-model="obj.system_menu_mobile_start_flag"
	                >
	                <i></i>
	              </label>
	            </div>
	        </div>



	        </div>

	    </form>
		</div>
	</div>
</div>
</div>
</div>


